3.1.4 \(\int (d+e x) (a+b \text {ArcTan}(c x)) \, dx\) [4]

Optimal. Leaf size=76 \[ -\frac {b e x}{2 c}-\frac {b \left (d^2-\frac {e^2}{c^2}\right ) \text {ArcTan}(c x)}{2 e}+\frac {(d+e x)^2 (a+b \text {ArcTan}(c x))}{2 e}-\frac {b d \log \left (1+c^2 x^2\right )}{2 c} \]

[Out]

-1/2*b*e*x/c-1/2*b*(d^2-e^2/c^2)*arctan(c*x)/e+1/2*(e*x+d)^2*(a+b*arctan(c*x))/e-1/2*b*d*ln(c^2*x^2+1)/c

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {4972, 716, 649, 209, 266} \begin {gather*} \frac {(d+e x)^2 (a+b \text {ArcTan}(c x))}{2 e}-\frac {b \text {ArcTan}(c x) \left (d^2-\frac {e^2}{c^2}\right )}{2 e}-\frac {b d \log \left (c^2 x^2+1\right )}{2 c}-\frac {b e x}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)*(a + b*ArcTan[c*x]),x]

[Out]

-1/2*(b*e*x)/c - (b*(d^2 - e^2/c^2)*ArcTan[c*x])/(2*e) + ((d + e*x)^2*(a + b*ArcTan[c*x]))/(2*e) - (b*d*Log[1
+ c^2*x^2])/(2*c)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 649

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[(-a)*c]

Rule 716

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 4972

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b*
ArcTan[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{
a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int (d+e x) \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {(d+e x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 e}-\frac {(b c) \int \frac {(d+e x)^2}{1+c^2 x^2} \, dx}{2 e}\\ &=\frac {(d+e x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 e}-\frac {(b c) \int \left (\frac {e^2}{c^2}+\frac {c^2 d^2-e^2+2 c^2 d e x}{c^2 \left (1+c^2 x^2\right )}\right ) \, dx}{2 e}\\ &=-\frac {b e x}{2 c}+\frac {(d+e x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 e}-\frac {b \int \frac {c^2 d^2-e^2+2 c^2 d e x}{1+c^2 x^2} \, dx}{2 c e}\\ &=-\frac {b e x}{2 c}+\frac {(d+e x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 e}-(b c d) \int \frac {x}{1+c^2 x^2} \, dx-\frac {(b (c d-e) (c d+e)) \int \frac {1}{1+c^2 x^2} \, dx}{2 c e}\\ &=-\frac {b e x}{2 c}-\frac {b \left (d^2-\frac {e^2}{c^2}\right ) \tan ^{-1}(c x)}{2 e}+\frac {(d+e x)^2 \left (a+b \tan ^{-1}(c x)\right )}{2 e}-\frac {b d \log \left (1+c^2 x^2\right )}{2 c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 77, normalized size = 1.01 \begin {gather*} a d x-\frac {b e x}{2 c}+\frac {1}{2} a e x^2+\frac {b e \text {ArcTan}(c x)}{2 c^2}+b d x \text {ArcTan}(c x)+\frac {1}{2} b e x^2 \text {ArcTan}(c x)-\frac {b d \log \left (1+c^2 x^2\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)*(a + b*ArcTan[c*x]),x]

[Out]

a*d*x - (b*e*x)/(2*c) + (a*e*x^2)/2 + (b*e*ArcTan[c*x])/(2*c^2) + b*d*x*ArcTan[c*x] + (b*e*x^2*ArcTan[c*x])/2
- (b*d*Log[1 + c^2*x^2])/(2*c)

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 78, normalized size = 1.03

method result size
derivativedivides \(\frac {\frac {a \left (d \,c^{2} x +\frac {1}{2} e \,c^{2} x^{2}\right )}{c}+b \arctan \left (c x \right ) d c x +\frac {b c \arctan \left (c x \right ) e \,x^{2}}{2}-\frac {b e x}{2}-\frac {b d \ln \left (c^{2} x^{2}+1\right )}{2}+\frac {b e \arctan \left (c x \right )}{2 c}}{c}\) \(78\)
default \(\frac {\frac {a \left (d \,c^{2} x +\frac {1}{2} e \,c^{2} x^{2}\right )}{c}+b \arctan \left (c x \right ) d c x +\frac {b c \arctan \left (c x \right ) e \,x^{2}}{2}-\frac {b e x}{2}-\frac {b d \ln \left (c^{2} x^{2}+1\right )}{2}+\frac {b e \arctan \left (c x \right )}{2 c}}{c}\) \(78\)
risch \(-\frac {i b \left (e \,x^{2}+2 d x \right ) \ln \left (i c x +1\right )}{4}+\frac {i b e \,x^{2} \ln \left (-i c x +1\right )}{4}+\frac {i b d x \ln \left (-i c x +1\right )}{2}+\frac {a e \,x^{2}}{2}+a d x -\frac {b d \ln \left (c^{2} x^{2}+1\right )}{2 c}-\frac {b e x}{2 c}+\frac {\arctan \left (c x \right ) b e}{2 c^{2}}\) \(101\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c*(a/c*(d*c^2*x+1/2*e*c^2*x^2)+b*arctan(c*x)*d*c*x+1/2*b*c*arctan(c*x)*e*x^2-1/2*b*e*x-1/2*b*d*ln(c^2*x^2+1)
+1/2*b/c*e*arctan(c*x))

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 73, normalized size = 0.96 \begin {gather*} \frac {1}{2} \, a x^{2} e + a d x + \frac {1}{2} \, {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} b e + \frac {{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/2*a*x^2*e + a*d*x + 1/2*(x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*e + 1/2*(2*c*x*arctan(c*x) - log(c
^2*x^2 + 1))*b*d/c

________________________________________________________________________________________

Fricas [A]
time = 1.19, size = 73, normalized size = 0.96 \begin {gather*} \frac {2 \, a c^{2} d x - b c d \log \left (c^{2} x^{2} + 1\right ) + {\left (2 \, b c^{2} d x + {\left (b c^{2} x^{2} + b\right )} e\right )} \arctan \left (c x\right ) + {\left (a c^{2} x^{2} - b c x\right )} e}{2 \, c^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/2*(2*a*c^2*d*x - b*c*d*log(c^2*x^2 + 1) + (2*b*c^2*d*x + (b*c^2*x^2 + b)*e)*arctan(c*x) + (a*c^2*x^2 - b*c*x
)*e)/c^2

________________________________________________________________________________________

Sympy [A]
time = 0.16, size = 87, normalized size = 1.14 \begin {gather*} \begin {cases} a d x + \frac {a e x^{2}}{2} + b d x \operatorname {atan}{\left (c x \right )} + \frac {b e x^{2} \operatorname {atan}{\left (c x \right )}}{2} - \frac {b d \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c} - \frac {b e x}{2 c} + \frac {b e \operatorname {atan}{\left (c x \right )}}{2 c^{2}} & \text {for}\: c \neq 0 \\a \left (d x + \frac {e x^{2}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d*x + a*e*x**2/2 + b*d*x*atan(c*x) + b*e*x**2*atan(c*x)/2 - b*d*log(x**2 + c**(-2))/(2*c) - b*e*x
/(2*c) + b*e*atan(c*x)/(2*c**2), Ne(c, 0)), (a*(d*x + e*x**2/2), True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [B]
time = 0.41, size = 67, normalized size = 0.88 \begin {gather*} a\,d\,x+\frac {a\,e\,x^2}{2}+b\,d\,x\,\mathrm {atan}\left (c\,x\right )-\frac {b\,e\,x}{2\,c}+\frac {b\,e\,\mathrm {atan}\left (c\,x\right )}{2\,c^2}+\frac {b\,e\,x^2\,\mathrm {atan}\left (c\,x\right )}{2}-\frac {b\,d\,\ln \left (c^2\,x^2+1\right )}{2\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atan(c*x))*(d + e*x),x)

[Out]

a*d*x + (a*e*x^2)/2 + b*d*x*atan(c*x) - (b*e*x)/(2*c) + (b*e*atan(c*x))/(2*c^2) + (b*e*x^2*atan(c*x))/2 - (b*d
*log(c^2*x^2 + 1))/(2*c)

________________________________________________________________________________________